<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class karyawan extends CI_Model {

	function __construct()
	{
		parent::__construct();
	}
	
	function insert($data){
		$this->db->insert('karyawan',$data);
	}	
	
	function delete($id){
		$this->db->where('no_karyawan', $id);
		$this->db->delete('karyawan');
	}
	
	function selectone($id){
		$this->db->select('*');
		$this->db->from('karyawan');
		$this->db->where('no_karyawan',$id);
		$query = $this->db->get();
		return $query;
	}
	
	function get_list(){
        $this->db->select('*');
        $this->db->from('karyawan');
        $this->db->where('no_karyawan !=','1');
        $query = $this->db->get();
        return $query->result_array();
    }
        
	function get_karyawan() {
		$this->db->select('*');
		$this->db->from('karyawan');
		$query = $this->db->get();
		return $query;
	}
	
}

?>